package application;

import java.awt.event.KeyEvent;
import java.util.ArrayList;

import display.Theme;
import files.ScoreObject;

public class Utils {
	
	public static String frameTitle = "MIAGE TETRIS";
	
	public static boolean gravityActivated = true;
	public static boolean soundActivated = true;	
	
	public static String fileName = "tetris.xml";
	private static Theme currentTheme;
	private static ArrayList<ScoreObject> scores;
	private static ArrayList<Theme> themes;
	private static String currentPlayer;
	
	
	public static int themeChoosen = 0;
	
	
	public static void setCurrentTheme(int i){
		if(themes.size() > i && i >= 0){
			themeChoosen = i;
			currentTheme = themes.get(themeChoosen).clone();
		}
	}
	
	public static Theme getCurrentTheme(){
		return currentTheme;
	}
	
	/*public static String getCurrentPlayer(){
		return currentPlayer;
	}
	
	public static void setCurrentPlayer(String pPlayer){
		currentPlayer = pPlayer;
	}*/
	
	
	
	//public static String[] themes = {"personalisé","basique","construction"};


	public static ArrayList<ScoreObject> getScores() {
		return scores;
	}

	public static void setScores(ArrayList<ScoreObject> scores) {
		Utils.scores = scores;
	}

	public static int getThemeChoosen() {
		return themeChoosen;
	}

	public static void setThemeChoosen(int themeChoosen) {
		Utils.themeChoosen = themeChoosen;
	}

	

	public static ArrayList<Theme> getThemes() {
		return themes;
	}

	public static void setThemes(ArrayList<Theme> themes) {
		Utils.themes = themes;
	}



	public static int keyMoveLeft = KeyEvent.VK_LEFT;
	public static int keyMoveRight = KeyEvent.VK_RIGHT;
	public static int keyMoveDown = KeyEvent.VK_DOWN;
	public static int keyRotate = KeyEvent.VK_UP;
	public static int keyDropDown = KeyEvent.VK_ENTER;
	public static int keyPause = KeyEvent.VK_PAUSE;
	
	
	public static int keyMoveLeft2 = KeyEvent.VK_LEFT;
	public static int keyMoveRight2 = KeyEvent.VK_RIGHT;
	public static int keyMoveDown2 = KeyEvent.VK_DOWN;
	public static int keyRotate2 = KeyEvent.VK_SPACE;
	public static int keyDropDown2 = KeyEvent.VK_ENTER;
	public static int keyPause2 = KeyEvent.VK_P;
	
	public static String buttonPlay 	= "Jouer";
	public static String buttonConfig 	= "Configuration";
	public static String boxSound 		= "Son";
	public static String[] cmbPlayers;
	public static String buttonNewPlayer = "Nouveau joueur";
	
	public static String buttonOk 		= "Ok";
	
	
	
}
